import java.util.Scanner;

    public class Training09 {
        public static void main(String[] args) {
            Scanner scanner = new Scanner(System.in);
            System.out.print("请输入班级总人数：");
            int totalStudents = scanner.nextInt();

            int[] grades = new int[totalStudents];
            int sum = 0;

            for (int i = 0; i < totalStudents; i++) {
                System.out.print("请输入第" + (i+1) + "个学生的成绩：");
                grades[i] = scanner.nextInt();
                sum += grades[i];
            }

            double average = (double) sum / totalStudents;
            System.out.println("全班平均成绩为：" + average);
            int[] scores = {6,61,71,80,59}; // 示例成绩数组
            int count80 = 0, count70 = 0, count60 = 0, countBelow60 = 0;

            for (int score : scores) {
                if (score >= 80) {
                    count80++;
                } else if (score >= 70) {
                    count70++;
                } else if (score >= 60) {
                    count60++;
                } else {
                    countBelow60++;
                }
            }

            System.out.println("成绩大于80分: " + count80);
            System.out.println("成绩大于70分: " + count70);
            System.out.println("成绩大于60分: " + count60);
            System.out.println("成绩不及格人数: " + countBelow60);
        }
    }


